namespace WL.Think.Abp.EntityFrameworkCore
{
    /// <summary>
    /// 表全局配置参数
    /// </summary>
    public class ThinkDbContextTableOptions
    {
        /// <summary>
        /// 表前缀
        /// </summary>
        public static string? DbTablePrefix { get; private set; }

        /// <summary>
        /// Scheme
        /// </summary>
        public static string? DbScheme { get; private set; }

        /// <summary>
        /// 移除的后缀
        /// </summary>
        public static string? RemoveSuffix { get; private set; } = "Entity";

        /// <summary>
        /// 配置表前缀和方案
        /// </summary>
        /// <param name="dbTablePrefix">表前缀</param>
        /// <param name="removeSuffix">移除后缀</param>
        /// <param name="dbScheme">方案</param>
        public static void Configure(string? dbTablePrefix = null, string? removeSuffix = null, string? dbScheme = null)
        {
            DbTablePrefix = dbTablePrefix;
            DbScheme = dbScheme;
            RemoveSuffix = removeSuffix != null ? removeSuffix : "Entity";
        }
    }
}
